package example.grpc.service.impl;


import com.bao.grpc.lib.UserGrpc;
import com.bao.grpc.lib.UserRequest;
import com.bao.grpc.lib.UserResponse;
import io.grpc.stub.StreamObserver;


public class UserServiceImpl extends UserGrpc.UserImplBase {

    @Override
    public void getUser(UserRequest request, StreamObserver<UserResponse> responseObserver) {
        UserResponse response = UserResponse.newBuilder().setMessage(request.getName()).build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    }

}